package com.dfec.book.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dfec.book.util.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Pattern;

/**
 * @author tangrg
 * @email 1446232546@qq.com
 * @date 2025-07-2025/7/2 10:46:23
 */
@ApiModel(description = "学生实体")
@TableName("student")
public class StudentEntity extends BasePage {


    /**
     * 主键
     */
    @TableId
    @ApiModelProperty(value = "学生ID（主键，自增）", example = "456")
    private Integer id;

    /**
     * 学生姓名
     */
    @ApiModelProperty(value = "学生姓名", example = "王五")
    private String name;

    /**
     * 性别 0、女 1、男 2、未知
     */
    @ApiModelProperty(value = "性别 0、女 1、男 2、未知", example = "1")
    private Integer sex;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话", example = "15623413662")
    @Pattern(regexp = "^1[3-9]\\d{8}$", message = "手机号码格式不正确")
    private String phone;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", example = "tangrg@126.com")
    private String email;

    /**
     * 班级名称
     */
    @ApiModelProperty(value = "班级", example = "高一三班")
    private String className;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }
}
